package com.ruoyi.ap.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 销售单对象 ap_order_header
 * 
 * @author HuaQP
 * @date 2023-09-15
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class Order extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    private Long id;

    /** 日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
    @NotNull(message = "日期不能为空")
    private Date dt;

    /** 农户 */
    @Excel(name = "农户")
    @NotNull(message = "农户不能为空")
    private Long farmerId;

    /** 收货人 */
    @Excel(name = "收货人")
    private String addressName;

    /** 联系电话 */
    @Excel(name = "联系电话")
    private String addressTel;

    /** 省 */
    private String addressProvince;

    /** 城市 */
    private String addressCity;

    /** 县区 */
    private String addressCounty;

    /** 详细地址 */
    @Excel(name = "详细地址")
    private String addressDetail;

    /** 地区编号 */
    private String areaCode;

    /** 销售区域 */
    @Excel(name = "销售区域")
    @NotBlank(message = "销售区域不能为空")
    private String saleArea;

    /** 销售方式( 1线下 / 2线上) */
    @Excel(name = "销售方式")
    @NotBlank(message = "销售方式不能为空")
    private String saleWay;

    /** 状态 -1已取消 / 0 待完成  /1已完成 */
    @Excel(name = "状态")
    private String status;
}
